package IO;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.nio.charset.StandardCharsets;

public class FileIS {
    public static void main(String[] args) throws IOException {
        File file=new File("Person.txt");
        long len=file.length();
        FileInputStream fis=new FileInputStream((file));
        //创建字节数组
        byte[] data=new byte[(int)len];
        fis.read(data);
        String line=new String(data,"utf-8");
        System.out.println(line);
        fis.close();
    }
}
